import React, { Component } from 'react'
import { Form, Input, Button, Row, Col, DatePicker } from 'antd'
import { withRouter } from 'react-router-dom'

import StoreHistoryNav from "@/redux/historyNav.js"
import { connect } from 'react-redux'
const mapStateToProps = (state, ownProps) => {
    return {
        ...state
    }
}
const mapDispatchToProps = (dispatch, ownProps) => {

    return {
        onClick: (data) => {

            dispatch(data)
        }
    }
}

class CommPageHeader extends Component {
    constructor(props) {
        super(props)
        console.log(props);
    }
    disabledDate(current) {
        return current < new Date() - 24 * 60 * 1000 * 60;
    }
    onPanelChangeFn(type, value, dateString) {
        console.log(type, value, dateString);
    }
    clickFn(data) {
        //this.props.onClick({ type: "HISTORY_CHANGE", value: data });
    }
    render() {
        const timeFormat = "YYYY-MM-DD";

        return (
            <>
                <div className="comm-tip mg-t-10">
                    <h2>学校勋章库说明：</h2>
                    <p>1、学校勋章库为本校内所有教师通用的勋章库。</p>
                    <p>2、学校管理员设置后学校勋章后，本校所有教师的常用勋章库中均会出现该勋章。</p>
                    <p>3、学校勋章可从系统提供的勋章库添加，也可以自定义添加。已经颁发过的勋章不可删除。</p>
                </div>
                <div className="school_modal">
                    {JSON.stringify(this.props.history_index)}
                    <nav className="nav text-c">
                        <label className="label" onClick={this.clickFn.bind(this, [{ key: 1, value: "受表扬" }])}>受表扬</label><label className="label" onClick={this.clickFn.bind(this, [{ key: 2, value: "待改进" }])}>待改进</label>
                    </nav>
                </div>
            </>
        )
    }
}
export default connect(mapStateToProps, mapDispatchToProps)(withRouter(CommPageHeader))